package com.bxx.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bxx.common.dto.ClassDto;
import com.bxx.entity.Class;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ClassMapper extends BaseMapper<Class> {
    @Select("SELECT `m_class`.*,(SELECT count(`m_blog`.id) FROM `m_blog` WHERE `m_class`.`id`=`m_blog`.`type`) sum FROM `m_class`")
    List<ClassDto> getClassInfo();
}
